function tipMsg(tip){
	if(tip!=null&&tip!=""){
		alert(tip);
	}
}

//分页
	    function getList(pageNum){
	      document.getElementById("pageNum").value = pageNum;
	      document.forms[1].submit();   
	    }
	    
	    function setPage(pageNum,totalPage){
	      if(pageNum==1){
	         document.getElementById("pre").disabled = true;
	      }
	      if(pageNum==totalPage){
	         document.getElementById("next").disabled = true;
	      }
	    }

	
	  


//验证是否为空
function checkEmpty(msg,name,tipid){
	if(msg==null||msg==""){
		document.getElementById(tipid).innerHTML = "<font style='font-size:12px;color:red'>"+name+"不能为空！</font>";
		return false;
	}
	else{
		document.getElementById(tipid).innerHTML = "&nbsp;";
	}
		return true;
}

//验证电话号码和传真
function checkPhone(msg,name,tipid){
	if(msg!=null&&msg!=""){
		var reg = /^\d{3}-\d{8}|\d{4}-\d{7}$/;
		if(msg.search(reg)!=0){
			document.getElementById(tipid).innerHTML = "<font style='font-size:12px;color:red'>"+name+"格式不正确！</font>";
			return false;
		}
		else{
			document.getElementById(tipid).innerHTML = "&nbsp;";
		}
	}
	else{
		document.getElementById(tipid).innerHTML = "&nbsp;";
	}
	return true;
}


//验证长度
function checkMaxLength(msg,name,length,tipid){
	if(msg!=null&&msg!=""){
		if(msg.length>length){
			document.getElementById(tipid).innerHTML = "<font style='font-size:12px;color:red'>"+name+"长度不能超过"+length+"！</font>";
			return false;
		}
		else{
			document.getElementById(tipid).innerHTML = "&nbsp;";
		}
	}
	else{
		document.getElementById(tipid).innerHTML = "&nbsp;";
	}
	return true;
}